package com.gray.useropeninterface;

import com.gray.user.UserClientBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created on 2019/6/22.
 *
 * @author Grak
 * @since 1.0
 */
@RestController
public class HelloControllerBase {

    @Autowired
    UserClientBase userClient;

    @RequestMapping("/indexBase")
    public String nsme2(@Valid int id) {
        String find = userClient.findByIdBase(id);
        System.out.println(find);
        return find;
    }

    @RequestMapping("/hello")
    public String hello(@Valid int id) {
        String find = "hello" + id;
        System.out.println(find);
        return find;
    }
}
